package com.allwees.bs.c.module.payment.service;

import com.allwees.bs.c.module.order.entity.OrderEntity;
import com.allwees.bs.c.module.payment.entity.PaymentLogEntity;
import com.allwees.support.payment.EPayMethod;

public interface IPaymentLogService {

    // 支付创建
    int PAYMENT_STATE_CREATED = 1;

    // 支付成功
    int PAYMENT_STATE_APPROVED = 2;

    // 支付被取消
    int PAYMENT_STATE_CANCEL = 3;

    // 支付已退款
    int PAYMENT_STATE_REFUND = 4;

    PaymentLogEntity findByOrderUuid(String paymentToken);

    PaymentLogEntity create(String paymentToken, int status, EPayMethod method, OrderEntity order);

    PaymentLogEntity payed(String orderUuid, String payerId, String paymentNo);

    PaymentLogEntity cancel(String orderUuid);
}
